import React from 'react';
import { Pagination } from 'antd';
import './index.less'

class PageFooter extends React.Component {
    constructor(props){
        super(props)
        this.state = {}
    }
    pageChange = (page,pageSize)=>{
        console.log("this",this.props)
        this.props.onPageChange(page,pageSize)
    }
    sizeChange = (current,size)=>{
        console.log("this",this.props)
        this.props.onSizeChange(current,size)
    }
    render() {
        return (
            <Pagination 
                total={this.props.total} 
                showSizeChanger 
                showQuickJumper
                onChange={this.pageChange}
                onShowSizeChange={this.sizeChange} 
                showTotal={()=>`共${this.props.total}条`}>
            </Pagination>
        );
    }
}

export {PageFooter}